import axios from "@/api/config"

export const uploade = data => axios.post('/system/file/affix/upload', data)  //上传文件接口

export const merge = data => axios.post('/system/file/affix/merge', data)  //合并分片

export const flieList = data => axios.post('/system/file/affix/list', data)  //获取文件列表

export const checkFlie = data => axios.post('/system/file/affix/check/file', data ,{ "headers": { 'Content-Type': 'application/x-www-form-urlencoded' } })  //检查文件是否存在

export const checkChunk = data => axios.post('/system/file/affix/check/chunk', data)  //检查切片

// /system/file/affix/download

export async function download(data) { //下载文件
    const url = '/system/file/affix/list';
    let res = await axios.get(url,data);
    return res;
}
export async function getFileList(data) { //获取文件列表
    const url = '/system/file/affix/list';
    let res = await axios.get(url,data);
    return res;
}

export async function deleteFile(data) { //删除文件
    const url = '/system/file/affix/delete';
    let res = await axios.delete(url,data);
    return res;
}